<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/tags/trymore" prefix="tm"%>

<style>
	.tbl td {border-color: #797979}
	#tblprof td.banner {line-height: 30px; font-size: 18px; font-weight: bold; text-align: center; margin: 0;}
	#tblprof td.field {background-color: #CFDBEC; line-height: 25px; text-align: center; margin: 0; width: 100px; font-size: 9pt;}
	#tblprof input.textInput {float:none;margin: 5px; width: 80px; height: 23px;}
</style>

<form method="post" action="app/proficient.do?action=actionSaveProficient" 
	class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);" id="formGroup">
	<div class="pageContent">
		<div class="pageFormContent" layoutH="56">
			<div align="right" style="margin-bottom: 15px; margin-right: 10px;">
				<table cellpadding="0" cellspacing="0" style="border-bottom: 1px solid #999; padding-bottom: 10px;">
					<tr>
						<td width="95px" align="center">推荐人</td>
						<td>
							<input name="rec.id" type="hidden" value="${entity ne null && entity.recommender ne null ? entity.recommender.id : ''}" />
							<input class="required" error_message="请输入`推荐人`" name="rec.username" type="text" value="${entity ne null && entity.recommender ne null ? entity.recommender.username : ''}" <c:if test="${op eq null || op ne 'view'}">postField="search" suggestFields="username,userNo" suggestUrl="app/base.do?action=lookupUserByName" lookupGroup="rec"</c:if> style="width: 90%;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
						</td>
						<td width="95px" align="center">推荐时间</td>
						<td>
							<input class="required textInput ${op ne null && op eq 'view' ? '' : 'date'}" name="recommendTime" 
								value="${refTime}" error_message="请填写`推荐时间`" type="text" style="width: 80px;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
						</td>
					</tr>
				</table>
			</div>
			
			<table class="tbl" id="tblprof" cellpadding="0" cellspacing="0" width="98%" border="1" style="border-collapse: collapse; border-color: #797979; margin: 0 auto;" rules="all">
				<tr>
					<td class='field'>姓名<b style="color: red; margin-left: 4px;">*</b></td>
					<td>
						<input class="textInput ${op ne null && op eq 'view' ? '' : 'required'}" id="fullName" 
							value="${entity ne null ? entity.fullName : ''}" name="fullName" type="text" style="width: 90%;" <c:choose><c:when test="${op ne null && op eq 'view'}">readonly</c:when></c:choose> />
					</td>
					<td class='field'>性别<b style="color: red; margin-left: 4px;">*</b></td>
					<td style="padding-left: 5px;">
						<select name="gender" class="combox">
							<option value="">请选择</option>
							<option value="0" ${entity ne null && entity.gender eq 0 ? 'selected' : ''}>男</option>
							<option value="1" ${entity ne null && entity.gender eq 1 ? 'selected' : ''}>女</option>
						</select>
					</td>
					<td class='field'>出生年月</td>
					<td>
						<input name="birthday" class="${op ne null && op eq 'view' ? '' : 'date'} textInput" 
							yearstart="-80" yearend="0" style="width: 90%;" value="${entity ne null ? entity.birthday : ''}" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
					</td>
				</tr>
				<tr>
					<td class='field'>单位名称</td>
					<td colspan="3">
						<input name="companyName" class="textInput" value="${entity ne null ? entity.companyName : ''}" type="text" 
							style="width: 96%;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
					</td>
					<td class='field'>部门</td>
					<td>
						<input name="department" class="textInput" value="${entity ne null ? entity.department : ''}" type="text" 
							style="width: 90%;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
					</td>
				</tr>
				<tr>
					<td class='field'>职务</td>
					<td>
						<input name="jobDuty" class="textInput" value="${entity ne null ? entity.jobDuty : ''}" type="text" 
							style="width: 90%;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
					</td>
					<td class='field'>职称</td>
					<td>
						<input name="jobTitle" class="textInput" value="${entity ne null ? entity.jobTitle : ''}" type="text" 
							style="width: 90%;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
					</td>
					<td class='field'>地址</td>
					<td>
						<input name="address" class="textInput" value="${entity ne null ? entity.address : ''}" type="text" 
							style="width: 90%;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
					</td>
				</tr>
				<tr>
					<td class='field'>手机号码</td>
					<td>
						<input name="mobilePhone" class="textInput" value="${entity ne null ? entity.mobilePhone : ''}" type="text" 
							style="width: 90%;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
					</td>
					<td class='field'>办公室号码</td>
					<td>
						<input name="officePhone" class="textInput" value="${entity ne null ? entity.officePhone : ''}" type="text" 
							style="width: 90%;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
					</td>
					<td class='field'>电子邮箱</td>
					<td>
						<input name="email" class="textInput email" value="${entity ne null ? entity.email : ''}" type="text" 
							style="width: 90%;" ${op ne null && op eq 'view' ? 'readonly' : ''}/>
					</td>
				</tr>
				<tr>
					<td class='field'>个人简要</td>
					<td colspan="5">
						<textarea name="briefing" rows="2" style="width: 98%; height: 50px; margin: 5px;" ${op ne null && op eq 'view' ? 'readonly' : ''}>${entity ne null ? entity.briefing : ''}</textarea>
					</td>
				</tr>
				<tr>
					<td class='field'>研究方向</td>
					<td colspan="5">
						<textarea name="researchArea" rows="2" style="width: 98%; height: 50px; margin: 5px;" ${op ne null && op eq 'view' ? 'readonly' : ''}>${entity ne null ? entity.researchArea : ''}</textarea>
					</td>
				</tr>
				<tr>
					<td class='field'>推荐理由</td>
					<td colspan="5">
						<textarea name="referReason" rows="2" style="width: 98%; height: 50px; margin: 5px;" ${op ne null && op eq 'view' ? 'readonly' : ''}>${entity ne null ? entity.referReason : ''}</textarea>
					</td>
				</tr>
				<tr>
					<td class='field'>部门意见</td>
					<td colspan="3">
						<textarea name="departmentComment" rows="2" style="width: 97%; height: 40px; margin: 5px;" ${op ne null && op eq 'view' ? 'readonly' : ''}>${entity ne null ? entity.departmentComment : ''}</textarea>
					</td>
					<td class='field'>院领导意见</td>
					<td>
						<textarea name="leadershipComment" rows="2" style="width: 92%; height: 40px; margin: 5px;" ${op ne null && op eq 'view' ? 'readonly' : ''}>${entity ne null ? entity.leadershipComment : ''}</textarea>
					</td>
				</tr>
			</table>
		</div>
		
		<div class="formBar">
			<ul>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
				<li id="btn_allocate">
					<div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div>
				</li>
			</ul>
		</div>
	</div>
	<input type="hidden" name="id" value="${entity ne null ? entity.id : -1}" />
</form>
